package com.cs.bd.buychannel;

import java.util.List;

public class BuySdkInitParams {
    public final String mChannel;
    public final int mP45FunId;
    public final String mUsertypeProtocalCId;
    public final BuySdkInitParams.IProtocal19Handler mProtocal19Handler;
    public final boolean mIsOldUserWithoutSdk;
    public final String mOldBuyChannel;
    public final String mProcessName;
    public final boolean mIsCsKeyboard;
    public final List<String> mAdwordsGdnCampaignids;
    public final String mProductKey;
    public final String mAccessKey;
    public final boolean isSetImei;
    public final boolean mIsApkUpLoad45;
    public final boolean mUpLoad45Imediately;

    private BuySdkInitParams(BuySdkInitParams.Builder builder) {
        this.mChannel = builder.mChannel;
        this.mP45FunId = builder.mP45FunId;
        this.mUsertypeProtocalCId = builder.mUsertypeProtocalCId;
        this.mProtocal19Handler = builder.mProtocal19Handler;
        this.mIsCsKeyboard = builder.mIsCsKeyboard;
        this.mProductKey = builder.mProductKey;
        this.mAccessKey = builder.mAccessKey;
        this.mIsOldUserWithoutSdk = builder.mIsOldUserWithoutSdk;
        this.mOldBuyChannel = builder.mOldBuyChannel;
        this.mProcessName = builder.mProcessName;
        this.mAdwordsGdnCampaignids = builder.mAdwordsGdnCampaignids;
        this.isSetImei = builder.mIsSetImei;
        this.mIsApkUpLoad45 = builder.mIsApkUpLoad45;
        this.mUpLoad45Imediately = builder.mUpLoad45Imediately;
    }

    public interface IProtocal19Handler {
        void uploadProtocal19();
    }

    public static class Builder {
        public String mChannel;
        public int mP45FunId;
        public String mUsertypeProtocalCId;
        public BuySdkInitParams.IProtocal19Handler mProtocal19Handler;
        public boolean mIsCsKeyboard;
        public String mProductKey;
        public String mAccessKey;
        public boolean mIsOldUserWithoutSdk;
        public String mOldBuyChannel;
        public String mProcessName;
        public List<String> mAdwordsGdnCampaignids;
        public boolean mIsSetImei = true;
        public boolean mIsApkUpLoad45 = false;
        public boolean mUpLoad45Imediately = false;

        public Builder(String channel, int p45FunId, String usertypeProtocalCId, BuySdkInitParams.IProtocal19Handler p19Handler, boolean isCsKeyboard, String productKey, String accessKey) {
            this.mChannel = channel;
            this.mP45FunId = p45FunId;
            this.mUsertypeProtocalCId = usertypeProtocalCId;
            this.mProtocal19Handler = p19Handler;
            this.mIsCsKeyboard = isCsKeyboard;
            this.mProductKey = productKey;
            this.mAccessKey = accessKey;
        }

        public BuySdkInitParams.Builder upLoad45Imediately(boolean v) {
            this.mUpLoad45Imediately = v;
            return this;
        }

        public BuySdkInitParams.Builder isSetImei(boolean v) {
            this.mIsSetImei = v;
            return this;
        }

        public BuySdkInitParams.Builder isApkUpLoad45(boolean v) {
            this.mIsApkUpLoad45 = v;
            return this;
        }

        public BuySdkInitParams.Builder isOldUserWithoutSdk(boolean v) {
            this.mIsOldUserWithoutSdk = v;
            return this;
        }

        public BuySdkInitParams.Builder oldBuyChannel(String v) {
            this.mOldBuyChannel = v;
            return this;
        }

        public BuySdkInitParams.Builder processName(String v) {
            this.mProcessName = v;
            return this;
        }

        public BuySdkInitParams.Builder adwordsGdnCampaignids(List<String> v) {
            this.mAdwordsGdnCampaignids = v;
            return this;
        }

        public BuySdkInitParams build() {
            return new BuySdkInitParams(this);
        }
    }
}
